/**
 * MP Software.
 */
package models;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;

import play.data.validation.Required;
import play.db.jpa.Model;

/**
 * @author Jeremiah John M. Macariola
 *
 */
@Entity
public class Employee extends Model {

    @Required
    public String name;

    public String address;

    public String atmNumber;

    @Required
    @ManyToOne
    public Client client;

    @Required
    @ManyToOne
    public Rate rate;

    public Employee(String name, String address, String atmNumber, Client client, Rate rate) {
        super();
        this.name = name;
        this.address = address;
        this.atmNumber = atmNumber;
        this.client = client;
        this.rate = rate;
    }

    @Override
    public String toString() {
        return name;
    }

}
